#ifndef PUSHBUTTON_H
#define PUSHBUTTON_H
#include <QPushButton>

class PushButton : public QPushButton
{
    Q_OBJECT
public:
    explicit PushButton(QWidget* parent = nullptr) : QPushButton(parent) { }
    explicit PushButton(const QString& text, QWidget* parent = nullptr) : QPushButton(text, parent)
    {
    }
    PushButton(const QIcon& icon, const QString& text, QWidget* parent = nullptr)
        : QPushButton(icon, text, parent)
    {
    }

signals:
    void doubleClicked();

protected:
    void mouseDoubleClickEvent(QMouseEvent* e) override
    {
        QPushButton::mouseDoubleClickEvent(e);
        Q_EMIT doubleClicked();
    }
};

#endif // PUSHBUTTON_H
